Objects Reference

particle::compute_collision

Prototype

int compute_collision(vector& p,vector& v)

Parameters

Parameter Type Description
p vector& target position
v vector& target velocity

Return Value

Returns TRUE if a collision was found, FALSE for no collision.

Remarks

This function is used to compute collision for a moving particle. The p and v parameters are the new computed position and velocity parameters. If a collision is found between p and the current position, then both p and v will be modified accordingly.